1. Field of the Invention
The present invention relates generally to computer and communication systems. More particularly, the present invention relates to a system and method for message management, including the detection, identification, and suppression of undesirable message sequences.
2. Background and Objects of the Present Invention
In computer and communications systems which generally rely on many millions of programmed instruction for proper operation, system functionality is almost always divided into many distinct program modules with a specific functionality assigned to each module. In order to carry out operation of a system as a whole, however, program modules must communicate information to users and other program modules, report status, pass and receive arguments or parameters, and so on, so that the diverse modules may function properly as an integrated system.
Program modules may communicate with each other in a variety of ways. For program modules which exist, for example, as a subroutine or function, one program module may reference other program modules by subroutine call, function call and/or procedure call. As a result, the calling and called programs are related with each other hierarchically, with the calling module as superordinate and the called module as subordinate. Program modules which are not related through a calling/called relationship may communicate with each other through messages or signals generated, for example, as events occur or as errors are encountered.
Intercommunication between program modules using messages or signals is particularly prevalent in real-time environments where program modules run as independent, concurrent tasks or processes which detect and respond to real time events by generating associated messages or signals reporting events or status, making requests and the like. In both examples, whether through subroutine calls or through signals or messages, the purpose of such inter-module communication is to give and receive information, to request information, and to fetch information, all the while continuing the sequence of execution within the computer processor in order to achieve the functionality of the entire system.
From the viewpoint of an operating system of a computer or communication system whose duties include scheduling of program execution, communications between program modules must be regulated to control or limit the amount of time allotted for the execution of any segment of a program module. As is well understood in the arts, a program module can neither make an infinite number of subroutine calls nor generate an infinite number of messages before interference from the operating system occurs in the form of an interrupt or other request for processor service by other program segments in the processor execution queue. Moreover, in addition to temporal limitations, system limitations, such as available memory, for example, may be present which force the operating system to limit the scope of execution of a program module.
Memory allocated for the purpose of storing parameters and other information associated with subroutine calling is commonly referred to as the xe2x80x9cstackxe2x80x9d, which, of course, is subject to size limitations. Accordingly, subroutine or procedure call nesting is conventionally regulated by the operating system based upon size of the stack allocated for storing the addresses of called subroutines and return addresses of the calling program module. The parameter information or arguments provided to a subroutine from a is calling program module may also be passed through, a predetermined location within the stack. When the stack runs out of space, no further subroutine operations can occur and the operating system normally terminates the execution of the entire program with an error description, such as stack overflow/underflow. The execution of a program may also be aborted if a program module generates thousands of messages in a very short time, e.g., less than a second. Messages or signals generated by a program module are normally stored in a message buffer or message queue in memory which is also subject to size limitations. When a message buffer memory area runs out of free space, the operating system normally terminates the execution of the program module with an appropriate message.
Operating systems may further affect the execution of a program module by using a priority scheme. In such a system, some program modules have a higher priority than other program modules, with execution of higher priority program modules having preference over lower priority program modules. As a result, messages from higher priority program modules are processed prior to messages from lower priority program modules.
Despite operating system measures to limit the temporal scope of execution and the amount of resources used by any one program module at any one time, problems persist in conventional computer and communication system environments in that:
(1) an errant program module can generate a never-ending message sequence;
(2) an infinite message sequence generated by a higher execution priority program module will deprive a lower execution priority program module of execution time;
(3) messages generated by lower execution priority program modules awaiting execution time will occupy and perhaps overflow the message buffer memory area; and
(4) message buffer memory area overflow may cause the termination of other program modules, possibly leading to system failure.
Attempts in the prior art to address and resolve some of the above and related problems have included the following measures:
(1) limiting the number of sequential subroutine calls made by a program module, e.g., by limiting stack size;
(2) limiting the number of messages which may be generated by a program module during a thread of execution;
(3) discarding certain messages arriving at a process during execution conditions declared unfavorable to the reception of those messages; and
(4) discarding messages when the message buffer memory area is saturated or full or about to overflow.
While the attempts at correction measure may slow the rate at which such error conditions occur or prevent such errors under limited circumstances, the computer or communication system will generally encounter an unrecoverable failure if, for example, lower execution priority program modules are deprived of execution time for any length of time significant from the waiting program module""s frame of reference or, for example, the message buffer memory area becomes saturated.
In general, undesirable sequences of messages which unnecessarily consume processor time and/or buffer area resources are a nuisance which operating systems of the prior art do not provide a solution for. The consequences of program modules generating undesirable message sequences are often that the entire system is rendered inoperable. Although some operating systems provide limited corrective and preventive measures in the form of limiting buffer sizes and number of messages capable of being generated, such measures in themselves may seriously degrade system performance and may nonetheless fail to be fully effective. Such problems may be particularly acute for communications systems which service telephone traffic or computer systems servicing electronic commerce or other critical functions.
In view of the foregoing, it would, therefore, be desirable to provide a system and method which overcomes the above-described inadequacies and shortcomings of conventional techniques.
More particularly, it would be desirable to provide a system and method for detecting and correcting undesirable message sequences in an efficient and cost-effective manner.
The present invention describes a system and method to identify message sequences, particularly unwanted or spurious message sequences, that occur in a computer or communication system or any related components of such systems. The present invention defines and detects these undesirable message sequences and preferably removes the cause. A report may then be created, indicating the messages generated, the sequence of the messages and the generating program module and related information.
In accordance with one aspect of the present invention, message sequences transmitted to and from one program module to another program module are tracked, including message sequences transmitted to and from an operating system extension. Such tracking may include, but is not limited to, a function of setting a starting message point, and counting all subsequent message transmittals or transmissions. Further, tracking in the present invention may be implemented as an operating system extension, as an independent operating system program module, and may further be implemented in a hardware, software, firmware or programmable logic device which may also be configured by conventional programming means.
According to a further aspect of the present invention, an operating system extension, for example, may be configured to detect an undesirable number of messages, e.g., a message loop. The operating system extension may be configured to detect message looping of a finite or an infinite nature based on the detection of a predetermined number of sequential messages, i.e., a limit or threshold. The operating system extension of the present invention may further be configured to detect a sequence of messages which exhibits characteristics beyond what would be expected. Detection in the present invention may be implemented as an operating system extension, as an independent operating system program module, and may further be implemented in a hardware, software, firmware or programmable logic device which may also be configured by conventional programming means.
In accordance with yet another aspect of the present invention, the operating system extension, for example, may be configured to define what characterizes message looping. The operating system extension of the present invention may be configured to define message looping of a finite or infinite nature based on a predetermined number of messages in order. The operating system extension of the present invention may further be configured to define a sequence of messages which is beyond the expected sequence norm. Defining, in accordance with the present invention, may be implemented as an operating system extension, as an independent operating system program module, and may further be implemented in a hardware, software, firmware or programmable logic device which may also be configured by conventional programming means.
According to still a further aspect of the present invention, the operating system extension may be configured to terminate the execution associated with an undesirable sequence of messages or message loop. The operating system extension of the present invention may further be configured to provide a report including a sample subset of the terminated message sequence or message loop. Termination in accordance with the present invention may be implemented as an operating system extension, as an independent operating system program module, and may further be implemented in a hardware, software, firmware or programmable logic device which may also be configured by conventional programming means.